-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of PHP alias in the Python client #1288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far!
Because the client relied on the use of the compatibility endpoint, this PR effectively removes a LOT of test coverage for that endpoint... Can you expand on the tiny bit of api.php-specific testing left in test_covidcast_endpoints.py
to make up for some of the loss? Using the as_api_compatibility_row_*
methods from src/common/covidcast_row.py
might make some of that easier.
Have you checked yet to make sure the covidcast client and covidcast-indicators are compatible with these changes (mentioned in the first comment of the associated issue, #1285)? After you verify the covidcast client still works properly, you will need to change this line in signal_dash_data_generator.py
.
Also, a quick search through the code shows some comments still mention "api.php" where they probably shouldnt.
Good point! Can you create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, but second @melange396's comments about checking downstream effects on the covidcast Python client (and any other places that from delphi_epidata import Epidata
such as hhs).
@melange396 @dshemetov fixed the issues you've mentioned, and also created two PRs to fix the compatibility changes which will be caused by this being merged: cmu-delphi/covidcast-indicators#1899 |
This is a breaking change to the Python client API; we'll want to make sure we update the version number on release accordingly. |
from cmu-delphi/covidcast#663 (comment) @capnrefsmmat said:
and i said:
|
We COULD decouple the python client version from the repository version by changing the PyPI metadata here and here, removing those files from the automatic version bumping here, and then changing the version in the client code here. That would require us to remember to update the version number by hand in all those places if/when the python client code changes again (or come up with an automatic solution). On the plus side, that would stop us from a ridiculous practice we have been doing pretty frequently in the past: changing the client version number when there are changes elsewhere in the repository even though the client code is literally identical. |
On the separate automatic solution for the client: we could probably have another We could also live with manual version updates for the clients. These clients are quite stable, I'm happy to punt on the automation and not make this PR dependent on that. |
TODO: look for code in the system that depends on the client package version number being coupled to the repo version. Probably need to check version-specifying config files in this repo (and in other repos). |
It looks like our github action for publishing to PyPI will no-op if the version in Going with a new hand-coded client version of Or we could sweep it under the rug by leaving the repository version linked to the python client version and just increment the patch number, and hope that nobody experiences untoward effects. If some user's code breaks when they update to version In the past, we've done some potentially "breaking" changes with just a patch-level version bump -- thats not exactly justification for doing it again, but it is a precedent. |
Im not sure what you mean; I dont think anything DEPENDS on the client version being tied to the rep version, but rather they simply happen to be tied together as a consequence of the client and server code existing in the same place with a shared bumpversion config. |
I was thinking of it abstractly: if you have dependencies X and Y that you know are coupled in version and are bundled together, you can bury the dependence on Y being a version, by specifying the X version and installing Y from the obtained bundle. The key is the bundling though, so if the client is always installed from PyPI (and not by downloading this repo), then I think we're safe. Otherwise, if the client races ahead in version, installing from the repo will get you an old client version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good to me, but it seems like we need to make a decision on versioning. My personal take is
- we should decouple this client from repo version and start doing SemVer proper
- we take this Python client release GitHub action and move it to a separate file that's triggered automatically (a) from the main branch, (b) when
delphi_epidata.py
changes - my order of preference for next version is v5.0.0 to v4.2.0 to v4.1001.0 to v4.1.10, but @melange396 has final say here
My call on the versioning discussion: keep it the way it is (for now) and revert Rationale:
TODO:
Additionally, as a note to our future selves: we may want to announce the new client version (after release) to our user email list to suggest they upgrade. |
revert and deprecate async_epidata (+ Remove usage of PHP alias in the Python client)
Should we mark functions downstream of |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but lets wait to merge it until the last few comments in cmu-delphi/covidcast#663 are addressed
Closes #1285.
Summary:
Removes all references to the
api.php
compatibility endpoint insrc/client/delphi_epidata.py
, instead redirecting all requests to their respective endpoints.This has some implications on the outputs of the client, as it is taken out of "compatibility mode", which would normally be set by the call to the
api.php
endpoint. This means:"epidata": []
field on missing rowscovidcast
endpointThose changes are reflected in the integration tests.
Prerequisites:
dev
branchdev